let webSocket = new WebSocket("ws://127.0.0.1:8080/test");

webSocket.onopen = function () {
    console.log("onopen");
}
webSocket.onmessage = function () {
    console.log('onmessage');
}

webSocket.onerror = function () {
    console.log('onerror');
}
webSocket.onclose = function () {
    console.log('onclose');
}

webSocket.send('hello world')
